The present invention relates to computer storage systems, and more specifically, to storage with point-in-time copy with target write optimization.
In the field of computer storage systems, storage controllers manage access to a storage space comprised of numerous hard disk drives. Computer systems may communicate Input/Output (IO) requests to the storage space through the storage controller.
Point-in-time copy is a feature supported on various storage devices that allows nearly instantaneous point-in-time copies of entire logical volumes or data sets to be made. The point-in-time function enables one to make full volume copies of data, with the copies immediately available for read or write access. The copy may be used with standard backup tools that are available in a computing environment to create backup copies.
A point-in-time copy instruction starts the point-in-time copy process, which creates a map from a source volume to a target volume. The image of the source volume at this specific point in time is now available on the target volume. This creates a backup of the data on the source volume, and also allows tests and other administration tasks to be run on the data of the source volume, without the attendant danger of losing any of the original data, as it is preserved on the original source volume.
When a point-in-time copy is made, it creates a link between the two source and target volumes, as defined by the map. Data may now be copied across in the background, with the additional requirement that any access to the target volume will immediately cause the relevant parts of the image of the source volume to be copied across, and also any access to the source volume which would result in a change to the image stored by that source volume will also cause the unaltered data to be immediately copied across to the target volume. In this way, the target volume, to an outside user, stores the point-in-time copy of source volume, although data will only be physically copied across under the circumstances described above.
A storage volume that is the target volume of a point-in-time copy function can also be the source volume of a further point-in-time copy function, thus creating a cascade of storage volumes.
Some storage controllers allow a user to configure more than one target for a given source, providing a number of available applications. For instance, different experiments could be run against each of the targets. In another example, the targets might be taken at different times (e.g., different days in the week) and allow historical access to the disk, perhaps for the purpose of recovering from data corruption, such as data corruption that might be caused by a virus.
Point-in-time copy implementations achieve the illusion of the existence of a second image by redirecting read IO addressed to target volume to the source volume, unless that region has been subject to a write. When a region has been the subject of a write (i.e., to either the source or the target), in order to maintain the illusion that both source and target own their own copy of the data, a process is invoked which suspends the operation of the write command, and without it having taken effect, issues a read of the affected region from the source, applies the read data to the target with a write, then, if the previous steps were successful, releases the suspended write. Subsequent writes to the same region do not need to be suspended since the target will already have its own copy of the data. This copy-on-write technique is well known and is used in many environments.